package fluxx.draft;

import java.awt.Color;

public abstract class Rule extends Card {

	private final String type;
	
	public Rule (String name, String description, String type) {
		super(name, description);
		this.type = type;
	}

	@Override
	public Color getColor() { return Color.YELLOW; }
	public String getType() { return type; }
	
	// New style
	// These empty methods are to be overridden by concrete rule cards
	public int getDrawAmount(GameState game, int drawAmountIn) { return drawAmountIn; }
	public int getPlayAmount(GameState game, int playAmountIn) { return playAmountIn; }
	public void applyPassTurn(GameState game) {}
	public boolean isGoalSatisfied(GameState game) {
		return (game.goal != null && game.goal.hasWinner(game));
	}
	public void applyPlayFirst() {}
	
	@Override
	public void bePlayed(GameState game, Player player) {
		game.rules.addRule(this);
		//apply(game);
	}
}